

import http from "../../utils/http";




export interface menusof{
    _id?:string;
    title?:string;
    type?:string;
    sort?:string;
    order?:string;
    show?:number;
    action?:string;
 
    children?: menusof[]
    }

    // export interface searchparams{
    //     _id?:string;
    //     title?:string;
     
    //     }

interface CreatorItem{
    creator:string;
  
}


const  menus= {
    // 查询权限菜单数据
    search: (data?: pagequery & CreatorItem) => http.post('/menus/search', data),
    // 新增权限菜单数据
    add: (data: menusof & CreatorItem) => http.post('/menus/add', data),
    // 删除权限菜单数据
    remove: (data:deleteparams & CreatorItem ) => http.delete('/menus/remove', data),
    // 修改权限菜单数据
    update: (data: menusof & CreatorItem) => http.put('/menus/update', data)
}


export default menus